<div id="user" class="modal" tabindex="-1" role="dialog" aria-hidden="true" style="display: none;">
		<div class="modal-dialog">	
			<div class="modal-content">
				<div class="modal-header">	
					<button type="button" class="close" ng-click="closeModel()">×</button>	
					<h3>新增模板</h3>
				</div>
				<div class="modal-body">
					<div class="media">
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-3 col-lg-2 control-label">模板标题</label>
							<div class="col-sm-8 col-lg-9 col-xs-12">
								<input type="text" ng-model="item.title" class="form-control" placeholder="请输入模板标题"/>
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-3 col-lg-2 control-label">模板标识</label>
							<div class="col-sm-8 col-lg-9 col-xs-12">
								<input type="text" ng-model="item.code" class="form-control" placeholder="请输入模板标识，注意请填写小写字母"/>
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-xs-12 col-sm-3 col-md-3 col-lg-2 control-label">模板封面图</label>
							<div class="col-sm-8 col-lg-9 col-xs-12">
								<script type="text/javascript">
									function deleteImage(elm){
										require(["jquery"], function($){
											$(elm).prev().attr("src", "./resource/images/nopic.jpg");
											$(elm).parent().prev().find("input").val("");
										});
									}
								</script>
								<div class="input-group ">
									<input type="text" ng-model="item.image" class="form-control" autocomplete="off">
									<span class="input-group-btn">
										<button class="btn btn-default" type="button" ng-click="showImageDialog(item);">选择图片</button>
									</span>
								</div>
								<div class="input-group " style="margin-top:.5em;">
									<img ng-src="{{item.image || './resource/images/nopic.jpg'}}" class="img-responsive img-thumbnail" width="150">
									<em class="close" style="position:absolute; top: 0px; right: -14px;" title="删除这张图片" ng-click="deleteImage(this)">×</em>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<button class="btn btn-primary sendmessage" ng-click="postData(item)">确定</button>
				</div>	
			</div>
		</div>
	</div>